1. Field of the Invention
Embodiments of the present disclosure relate to an image pickup apparatus, a method of controlling the image pickup apparatus, and a storage medium. More particularly, the one disclosed aspect of the embodiments relates to an image pickup apparatus having auto focus capability, a method of controlling an image pickup apparatus having auto focus capability, and a program storing a program form controlling an image pickup apparatus having auto focus capability.
2. Description of the Related Art
One known method of achieving auto focus capability in an image pickup apparatus such as a digital camera is to move a focus lens based on a luminance signal supplied from an image sensor such as a CCD device so as to focus on an object. More specifically, a focus evaluation value indicating the contrast in a focus detection area is calculated using a high-frequency component of a signal in the focus detection area set in an image screen. The image pickup apparatus calculates the focus evaluation value while moving the focus lens in a direction in which the focus evaluation value increases, and detects a position of the focus lens where the focus evaluation value has a highest value. The detected position of the focus lens is employed as an in-focus position. This operation is called a hill-climbing AF (Auto Focus) operation. The focus evaluation value is then acquired while moving the focus lens forth and back in a short range around the in-focus position to confirm that the focus lens is in a position at which the focus evaluation value has a maximum value (i.e., at which the focus evaluation value has a peak of a hill-shaped curve). This operation is called “wobbling”. In a case where it is detected that the focus lens is not in a position where the focus evaluation value has a maximum value, the image pickup apparatus moves the focus lens to the position where the focus evaluation value has the maximum value. In this manner, the image pickup apparatus controls the focus lens so as to be maintained in the in-focus position.
In the hill-climbing AF operation and the wobbling, a focus level (indicating how good focus is obtained) at the current position of the focus lens is calculated based on the focus evaluation value, and a condition of driving the focus lens is switched depending on the calculated focus level. For example, the moving speed of the focus lens in the hill-climbing AF operation is set such that the lower the focus level, the greater the moving speed. In the wobbling, the moving distance of the focus lens is set such that the lower the focus level, the greater the moving distance. Conversely, the moving speed of the focus lens in the hill-climbing AF operation is set such that the higher the focus level, the smaller the moving speed, while in the wobbling, the moving distance of the focus lens is set such that the higher the focus level, the smaller the moving distance per one AF control. This method makes it possible to achieve a quick transition to a high focus level state from a low focus level. Furthermore, in the vicinity of the in-focus position, the method prevents the focus lens from overshooting the in-focus position.
In the auto focus method described above, it is necessary that the focus level should change properly as a function of a change in focus. However, if the luminance signal includes large noise, the noise may cause the focus level not to change in an expected proper manner, which may cause the auto focus operation to become unstable.
Japanese Patent Laid-Open No. 8-265631 discloses a technique in which a frequency characteristic of a bandpass filter is adaptively changed depending on a luminance signal. When luminance is high, a luminance signal includes high frequency components, and thus the frequency characteristic of the bandpass filter is shifted toward a higher frequency such that high frequency components are properly extracted. On the other hand, when luminance is low, the luminance signal includes less high frequency components, and thus the frequency characteristic of the bandpass filter is shifted toward a lower frequency such that low frequency components are extracted. This makes it possible to properly acquire focus evaluation values that allow the auto focus operation to be properly performed depending on a scene.
However, the method disclosed in Japanese Patent Laid-Open No. 8-265631 has a drawback that a large circuit scale is needed to realize the capability of changing the frequency characteristic of the bandpass filter. In the technique disclosed in Japanese Patent Laid-Open No. 8-265631, particular frequency components are extracted by first passing the luminance signal in the focus detection area through a TE-LPF which is a lowpass filter with a high cutoff frequency and then through an FE-LPF which is a lowpass filter with a low cutoff frequency. By subtracting one peak value from the other peak value, the focus level (TE/FE peak value) is calculated. In this method of calculating the focus level using the peak values, the focus level has a low dependence on the object and is not greatly influenced by camera shaking or the like. However, when the luminance signal includes a rather large noise component as in a low light scene, a high frequency component generated by the noise may cause the focus level to be calculated high regardless of whether a good focus is actually obtained or not. This may cause the focus level not to behave in an expected proper manner.